package com.example.fqapp.room.entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Index;
import androidx.room.PrimaryKey;

@Entity(tableName = "user", indices = {
        @Index(value = "phoneNum", unique = true)
})
public class EntityUser {
    @PrimaryKey(autoGenerate = true)//主键是否自动增长，默认为false
    private long id;

    @ColumnInfo(name = "phoneNum")
    public String phoneNum = "";

    @ColumnInfo(name = "name")
    public String name = "";

    @ColumnInfo(name = "password")
    public String password = "";

    public String getPhoneNum() {
        return phoneNum;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
